import axios from 'axios'

export const ProjectTypeService = class ProjectTypeService {
    static projectTypeService = null
    requestUrl = 'http://localhost/projectTypes'

    static getInstance() {
        if (this.projectTypeService == null) {
            this.projectTypeService = new ProjectTypeService()
        }
        return this.projectTypeService
    }

    /**
     * 查询项目类型的方法
     * @returns {Promise<AxiosResponse<T>>}
     */
    getList() {
        return axios.get(this.requestUrl)
    }
}
